<?php $this->load->view('base/header'); ?>

<link rel="stylesheet" media="screen" href="<?php echo base_url() . 'css/jquery.datatable.gui.css' ?>"/>
<link rel="stylesheet" media="screen" href="<?php echo base_url() . 'css/jquery-ui-1.8.14.custom.css' ?>"/>
<link rel="stylesheet" media="screen" href="<?php echo base_url() . 'css/table.css' ?>"/>
<style>
    .ui-datepicker-calendar {
        display: none;
    }

</style>
<script type="text/javascript" src="<?php echo base_url() . 'js/jquery-ui-1.8.14.custom.min.js' ?>"></script>
<script type="text/javascript" src="<?php echo base_url() . 'js/br-03/buat_potongan.js' ?>"></script>

<section>
    <div class="container_8 clearfix">

        <!-- Main Section -->

        <section class="main-section grid_8">
            <!-- Tabs Section -->
            <div class="main-content">
                <header>
                    <ul class="action-buttons clearfix fr">

                    </ul>
                    <h2>Buat Potongan</h2>
                </header>
                <section class="container_6 clearfix">
                    <div class="grid_6">

                        <section class="clearfix">
                            <form class="form" id="FORM_BUAT_POTONGAN" method="post">
                                <div style="float: left;">
                                    <div class="clearfix">
                                        <label>Untuk Tahun <small>yyyy-mm</small></label>
                                        <input class="date-picker" name="TGL_ANGSURAN" id="TGL_ANGSURAN"/>
                                    </div>

                                </div>

                                <div style="clear: both; margin-bottom: 20px;"></div>
                                <h3>Skema Potongan</h3>
                                <table id="SKEMA_POTONGAN" class="detail_table">
                                    <thead>
                                    <td>ID Peminjaman</td>
                                    <td>Angsuran Ke</td>
                                    <td>Cicilan Pokok</td>
                                    <td>Besar Bunga</td>
                                    <td>Besar Angsuran</td>
                                    <td>Sisa Hutang</td>
                                    <td>Pilihan</td>
                                    </thead>
                                    <tbody>

                                    </tbody>
                                </table>
                                <br/>
                                <br/>

                                <div class="action clearfix">
                                    <button class="button button-gray" type="submit" id="ADD"><span class="accept"></span>Simpan</button>
                                    <button class="button button-gray" type="submit" id="EXCEL"><span class="view-list"></span>Excel</button>
                                    <button class="button button-gray" type="submit" id="EMAIL"><span class="view-list"></span>Email</button>
                                    <button class="button button-gray" type="reset"><span class="bin"></span>Batalkan</button>
                                </div>
                            </form>
                        </section>
                    </div>
                </section>
            </div>
            <!-- End Tabs Section -->
    </div>
</section>
</div>

<div id="dialog-pelunasan" style="clear: both;">
    <form id="form-pelunasan" class="form" method="post">

        <div class="clearfix">
            <label>Nomor Anggota<small></small></label>
            <input type="text" name="ID_ANGGOTA" id="ID_ANGGOTA" size="4"/>
            <input type="hidden" name="ID_PINJAMAN" id="ID_PINJAMAN"/>
            <input type="hidden" name="ANGSURAN_KE" id="ANGSURAN_KE"/>
        </div>
        <!--<div class="clearfix">
            <label>Nama Anggota <small></small></label>
            <input type="text" name="NAMA_ANGGOTA" id="NAMA_ANGGOTA" />
        </div>-->
        <div class="clearfix">
            <label>Tanggal Pinjaman<small>yyyy-mm-dd</small></label>
            <input type="date" name="TGL_ANGSURAN" id="TGL_ANGSURAN" />
        </div>
        <div class="clearfix">
            <label>Jenis Pinjaman <small></small></label>
            <input type="text" name="JENIS_PINJAMAN" id="JENIS_PINJAMAN" />
        </div>
        <div class="clearfix">
            <label>Sisa Hutang <small></small></label>
            <input type="text" name="PIUTANG" id="PIUTANG_SISA" />
            <input type="hidden" name="CICILAN_POKOK" id="CICILAN_POKOK" />
        </div>
        <div class="clearfix">
            <label>Jumlah Denda <small></small></label>
            <input type="text" name="DENDA" id="DENDA" />
            <input type="hidden" name="BUNGA" id="BUNGA" />
        </div>
        <div class="clearfix">
            <label>Jumlah Harus Dibayarkan <small></small></label>
            <input type="text" name="TOTAL" id="TOTAL" />
            <input type="hidden" name="PIUTANG" id="PIUTANG" />
        </div>
        <hr />
        <div class="clearfix">
            <label>Jumlah Pelunasan <small></small></label>
            <input type="text" name="ANGSURAN" id="ANGSURAN" />
        </div>


        <div class="action clearfix">
            <button class="button button-gray" type="submit" id="ADD_LUNAS"><span class="accept"></span>Simpan</button>
            <button class="button button-gray" type="reset"><span class="bin"></span>Cancel</button>
        </div>
    </form>
</div>

<div id="edit_skema">
    <table id="edit_skema_table" class="detail_table">
        <thead>
            <tr>
                <td>ID Peminjaman</td>
                <td>Angsuran Ke</td>
                <td>Cicilan Pokok</td>
                <td>Besar Bunga</td>
                <td>Besar Angsuran</td>
                <td>Sisa Hutang</td>
            </tr>
        </thead>
        <tbody>

        </tbody>
        <tfoot></tfoot>
    </table>
</div>

<?php $this->load->view('base/footer'); ?>
